﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WCFPointOfSaleService.Class
{
    public class ParameterException : Exception
    {
        string _Code;
        string _Message;

        public ParameterException()
        {
        }

        public ParameterException(string code)
        {
            this._Code = code;
        }

        public ParameterException(string code, string message)
        {
            this._Code = code;
            this._Message = message;
        }

        public string Message
        {
            get
            {
                if (string.IsNullOrEmpty(_Message))
                    return System.Configuration.ConfigurationManager.AppSettings[_Code];
                else
                    return _Message;
            }
        }

        public string Code
        {
            get
            {
                return _Code;
            }
        }
    }
}